package com.juzi.wopu.service.impl;

import java.util.List;
import java.util.Map;

import com.juzi.wopu.domain.OrderStep;
import com.juzi.wopu.service.IOrderStepService;

public class OrderStepServiceImpl extends BaseServiceImpl<OrderStep> implements IOrderStepService{

	@Override
	public void getOrderStepMap(Map<Long, OrderStep> map1, Map<String, OrderStep> map2) {
		List<OrderStep> list=BaseDao.getAll(OrderStep.class);
		if(list!=null && list.size()>0){
			if(map1!=null && map2==null){
				for(OrderStep orderStep:list){
					map1.put(orderStep.getiId(), orderStep);
				}
			}
			else if(map1==null && map2!=null){
				for(OrderStep orderStep:list){
					map2.put(orderStep.getsName(), orderStep);
				}
			}
			else if(map1!=null && map2!=null){
				for(OrderStep orderStep:list){
					map1.put(orderStep.getiId(), orderStep);
					map2.put(orderStep.getsName(), orderStep);
				}
			}
		}
	}
}
